//
//  UILable+category.swift
//  FM
//
//  Created by x on 2017/9/1.
//  Copyright © 2017年 HLB. All rights reserved.
//

import UIKit

extension UILabel {
    
    /// 创建一个layout的样式的Lable
    ///
    /// - Returns: <#return value description#>
    class func layoutLable() -> UILabel {
        let tt = UILabel()
        tt.translatesAutoresizingMaskIntoConstraints = false
        
        return tt
    }
    
    class func lableWith(backgroundColor:UIColor) ->UILabel {
        let tt = layoutLable()
        tt.backgroundColor = backgroundColor
        
        return tt
    }
    
    class func lableWith(title:String, titleColor:UIColor, fontSize:CGFloat) ->UILabel {
        let tt = UILabel.layoutLable()
        tt.text = title
        tt.textColor = titleColor
        tt.font = UIFont.systemFont(ofSize: fontSize)
        
        return tt
    }
}
